/*
package com.example.Es;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.Map;

@RestController
public class TitleController {
    @Autowired
    private TitleService titleService;

    */
/**
     * 给索引添加数据
     *
     * @return
     *//*

    @PostMapping("save")
    public String save(@RequestBody TitleDocument titleDocument) throws NoSuchAlgorithmException {
        titleService.save(titleDocument);
        return "success";
    }

    */
/**
     * 删除
     *
     * @return
     *//*

    @PostMapping("delete")
    public String delete(Long id) {
        titleService.delete(id);
        return "success";
    }


    @GetMapping("get")
    public List<TitleDocument> getTitle(String param) {
        List<TitleDocument> titleDocumentList = titleService.getTitle(param);
        return titleDocumentList;
    }

    @GetMapping("page")
    public List<TitleDocument> pageTitle(Integer pageNumber, Integer pageSize, String searchContent) {
        List<TitleDocument> documentList = titleService.pageTitle(pageNumber, pageSize, searchContent);
        return documentList;
    }


    */
/**
     * 查询全部
     *//*

    @GetMapping("getAll")
    public List<TitleDocument> getAll() {
        List<TitleDocument> titleDocumentList = titleService.getAll();
        return titleDocumentList;
    }
    @GetMapping("getTypeGroupBy")
    public Map<String, String> getTypeGroupBy() {

        return  titleService.getTypeGroupBy();
    }

}*/
